function image = SubstituteBkg (image, color1, color2)
    sizeIm = size(image);
    for i = 1:sizeIm(1)
        for j = 1:sizeIm(2)
            if image(i,j,1) == image(i,j,2) && image(i,j,2) == image(i,j,3) && image(i,j,1) == color1, image(i,j,1:3) = color2; end
        end
    end
end